import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '@/views/LoginView'
import LayoutView from '@/views/LayoutView'
import HomeView from '@/views/HomeView'
import BusinessTask from '@/views/task/BusinessTask'
import OperationTask from '@/views/task/OperationTask'
Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: LoginView
  },
  {
    path: '/',
    redirect: '/home',
    component: LayoutView,
    children: [{ path: '/home', component: HomeView }, { path: '/task/business', component: BusinessTask }, { path: '/task/operation', component: OperationTask }]
  }
]

const router = new VueRouter({
  routes
})

export default router
